<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>组件模板</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        /* 通用样式 */
        body {
            font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
            background-color: #f8f8f8;
            color: #333;
            margin: 0;
            padding: 0;
        }
        
        /* 移动设备滚动条样式 */
        ::-webkit-scrollbar {
            width: 4px;
            height: 4px;
        }
        
        ::-webkit-scrollbar-track {
            background: transparent;
            border-radius: 4px;
        }
        
        ::-webkit-scrollbar-thumb {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 4px;
        }
        
        ::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 0, 0, 0.3);
        }
        
        /* 使滚动更流畅 */
        * {
            -webkit-overflow-scrolling: touch;
        }
        
        /* 横向滚动容器 */
        .scroll-container-x {
            overflow-x: auto;
            overflow-y: hidden;
            white-space: nowrap;
            scrollbar-width: thin; /* Firefox */
            scrollbar-color: rgba(0, 0, 0, 0.2) transparent; /* Firefox */
            -ms-overflow-style: none; /* IE and Edge */
            padding-bottom: 8px; /* 为滚动条预留空间 */
        }
        
        /* 纵向滚动容器 */
        .scroll-container-y {
            overflow-y: auto;
            overflow-x: hidden;
            scrollbar-width: thin; /* Firefox */
            scrollbar-color: rgba(0, 0, 0, 0.2) transparent; /* Firefox */
            -ms-overflow-style: none; /* IE and Edge */
            padding-right: 8px; /* 为滚动条预留空间 */
        }
        
        /* 隐藏滚动条但保留功能 */
        .scroll-hidden::-webkit-scrollbar {
            display: none;
        }
        
        .scroll-hidden {
            -ms-overflow-style: none;  /* IE and Edge */
            scrollbar-width: none;  /* Firefox */
        }
        
        /* 状态栏样式 */
        .status-bar {
            height: 44px;
            background-color: #ffffff;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            position: sticky;
            top: 0;
            z-index: 100;
            border-bottom: 1px solid #f0f0f0;
        }
        
        /* 底部导航栏样式 */
        .tab-bar {
            height: 83px;
            background-color: #ffffff;
            display: flex;
            justify-content: space-around;
            align-items: center;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            border-top: 1px solid #f0f0f0;
            padding-bottom: 20px; /* 适配iPhone底部安全区域 */
        }
        
        .tab-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: #999;
            font-size: 10px;
            padding: 8px 0;
        }
        
        .tab-item.active {
            color: #e86c60; /* 主题色 */
        }
        
        .tab-icon {
            font-size: 22px;
            margin-bottom: 4px;
        }
        
        /* 主内容区域 */
        .main-content {
            padding: 16px;
            padding-bottom: 100px; /* 为底部导航栏留出空间 */
            min-height: calc(100vh - 44px - 83px);
        }
        
        /* 主题色按钮 */
        .btn-primary {
            background-color: #e86c60;
            color: white;
            border-radius: 8px;
            padding: 12px 20px;
            font-weight: 500;
            border: none;
        }
        
        /* 辅助色按钮 */
        .btn-secondary {
            background-color: #f8d9d5;
            color: #e86c60;
            border-radius: 8px;
            padding: 12px 20px;
            font-weight: 500;
            border: none;
        }
    </style>
</head>
<body>
    <!-- iOS状态栏 -->
    <div class="status-bar">
        <div class="time font-medium">9:41</div>
        <div class="icons flex">
            <i class="fas fa-signal mr-1"></i>
            <i class="fas fa-wifi mr-1"></i>
            <i class="fas fa-battery-full"></i>
        </div>
    </div>
    
    <!-- 滚动条示例 -->
    <div class="p-4">
        <h3 class="text-lg font-medium mb-2">横向滚动示例</h3>
        <div class="scroll-container-x mb-6">
            <div class="inline-flex">
                <div class="w-32 h-32 bg-red-200 rounded-lg flex items-center justify-center mr-3">项目 1</div>
                <div class="w-32 h-32 bg-blue-200 rounded-lg flex items-center justify-center mr-3">项目 2</div>
                <div class="w-32 h-32 bg-green-200 rounded-lg flex items-center justify-center mr-3">项目 3</div>
                <div class="w-32 h-32 bg-yellow-200 rounded-lg flex items-center justify-center mr-3">项目 4</div>
                <div class="w-32 h-32 bg-purple-200 rounded-lg flex items-center justify-center mr-3">项目 5</div>
                <div class="w-32 h-32 bg-pink-200 rounded-lg flex items-center justify-center mr-3">项目 6</div>
            </div>
        </div>
        
        <h3 class="text-lg font-medium mb-2">隐藏滚动条示例</h3>
        <div class="scroll-container-x scroll-hidden mb-6">
            <div class="inline-flex">
                <div class="w-32 h-32 bg-red-200 rounded-lg flex items-center justify-center mr-3">项目 1</div>
                <div class="w-32 h-32 bg-blue-200 rounded-lg flex items-center justify-center mr-3">项目 2</div>
                <div class="w-32 h-32 bg-green-200 rounded-lg flex items-center justify-center mr-3">项目 3</div>
                <div class="w-32 h-32 bg-yellow-200 rounded-lg flex items-center justify-center mr-3">项目 4</div>
                <div class="w-32 h-32 bg-purple-200 rounded-lg flex items-center justify-center mr-3">项目 5</div>
                <div class="w-32 h-32 bg-pink-200 rounded-lg flex items-center justify-center mr-3">项目 6</div>
            </div>
        </div>
        
        <h3 class="text-lg font-medium mb-2">纵向滚动示例</h3>
        <div class="scroll-container-y h-64 mb-6">
            <div class="p-3 bg-red-200 rounded-lg mb-3">内容项 1</div>
            <div class="p-3 bg-blue-200 rounded-lg mb-3">内容项 2</div>
            <div class="p-3 bg-green-200 rounded-lg mb-3">内容项 3</div>
            <div class="p-3 bg-yellow-200 rounded-lg mb-3">内容项 4</div>
            <div class="p-3 bg-purple-200 rounded-lg mb-3">内容项 5</div>
            <div class="p-3 bg-pink-200 rounded-lg mb-3">内容项 6</div>
        </div>
    </div>
    
    <!-- 底部导航栏 -->
    <div class="tab-bar">
        <a href="home.html" class="tab-item active">
            <i class="tab-icon fas fa-home"></i>
            <span>首页</span>
        </a>
        <a href="family_tree.html" class="tab-item">
            <i class="tab-icon fas fa-sitemap"></i>
            <span>家谱</span>
        </a>
        <a href="family_activity.html" class="tab-item">
            <i class="tab-icon fas fa-calendar-alt"></i>
            <span>活动</span>
        </a>
        <a href="family_stories.html" class="tab-item">
            <i class="tab-icon fas fa-book"></i>
            <span>故事</span>
        </a>
        <a href="profile.html" class="tab-item">
            <i class="tab-icon fas fa-user"></i>
            <span>我的</span>
        </a>
    </div>
</body>
</html> 